package org.eiahe.hr.attendance.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.eiahe.hr.attendance.domain.Shift;

import java.time.LocalTime;

/**
 * 班次业务对象
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Shift.class, reverseConvertGenerate = false)
public class ShiftBo extends BaseEntity {

    /**
     * 班次ID
     */
    @NotNull(message = "班次ID不能为空", groups = { EditGroup.class })
    private Long shiftId;

    /**
     * 班次名称
     */
    @NotBlank(message = "班次名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String shiftName;

    /**
     * 上班时间
     */
    @NotNull(message = "上班时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalTime workStartTime;

    /**
     * 下班时间
     */
    @NotNull(message = "下班时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalTime workEndTime;

    /**
     * 午休开始时间
     */
    private LocalTime lunchStartTime;

    /**
     * 午休结束时间
     */
    private LocalTime lunchEndTime;

    /**
     * 迟到阈值(分钟)
     */
    private Integer lateThresholdMinutes;

    /**
     * 早退阈值(分钟)
     */
    private Integer earlyThresholdMinutes;

    /**
     * 状态(0正常 1停用)
     */
    private String status;

    /**
     * 备注
     */
    private String remark;
}
